package cn.edu.lingnan.dao;

import cn.edu.lingnan.pojo.Course;
import cn.edu.lingnan.pojo.Student;
import org.apache.ibatis.annotations.*;

@Mapper
public interface CourseMapper {
    @Insert("insert into school1.course values (#{cid},#{cname},#{cflag})")
    Integer insert(Course course);

    @Delete("delete from school1.course where cid=#{cid}")
    Integer deleteById(String cid);

    @Update("update school1.course set cname=#{cname}, cflag=#{cflag} where cid=#{cid}")
    Integer updateById(Course course);

    @Select("select * from school1.course where cid=#{cid}")
    Course getById(String cid);
}
